[IA64] Avoid iterative VHPT purges
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Thu, 21 Sep 2006 21:34:10 +0000 (15:34 -0600)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Thu, 21 Sep 2006 21:34:10 +0000 (15:34 -0600)
Workaround to avoid iteratively purging 16M itr.d using
16k Xen VHPT page size.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
xen/arch/ia64/vmx/vmmu.c

index 9412810f3dbba5226bb0278a600138b8f1def77a..8861caf36477235b8855f292040b573ecdc962bc 100644 (file)
@@ -456,7 +456,15 @@ IA64FAULT vmx_vcpu_itr_d(VCPU *vcpu, u64 slot, u64 pte, u64 itir, u64 ifa)
     }
 #endif   
     pte &= ~PAGE_FLAGS_RV_MASK;
-    thash_purge_entries(vcpu, va, ps);
+
+    /* This is a bad workaround
+       In Linux, region 7 use 16M pagesize and is identity mapped.
+       VHPT page size is 16K in XEN.  If purge VHPT while guest insert 16M,
+       it will iteratively purge VHPT 1024 times, which makes XEN/IPF very
+       slow.  XEN doesn't purge VHPT
+    */   
+    if (ps != _PAGE_SIZE_16M)
+        thash_purge_entries(vcpu, va, ps);
     gpfn = (pte & _PAGE_PPN_MASK)>> PAGE_SHIFT;
     if (VMX_DOMAIN(vcpu) && __gpfn_is_io(vcpu->domain, gpfn))
         pte |= VTLB_PTE_IO;